package lancooControl;

/**
 * Created by Administrator on 2017/3/2.
 */

import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.lancooznbk.R;


/**
 * 项目名称：translate
 * 实现功能：  翻译详情界面，分享弹出窗口
 * 类名称：PopupWindow
 * 类描述：(该类的主要功能)
 * 创建人：
 * E-mail:
 * 创建时间：
 * 修改人：
 * 修改时间：
 * 修改备注：
 * @version
 */
public class PopupWindowMoreFunction extends PopupWindow {
    private View mainView;
    private RelativeLayout rLayoutDictionary, rLayoutDifficultQuestion;
    public static ImageView ImvDifficultQuestion;
    public static TextView TvDifficultQuestion;

    public PopupWindowMoreFunction(Activity paramActivity, View.OnClickListener paramOnClickListener, int paramInt1, int paramInt2){
        super(paramActivity);
        //窗口布局
        mainView = LayoutInflater.from(paramActivity).inflate(R.layout.pop_more_function, null);
        //分享布局
        rLayoutDictionary = ((RelativeLayout) mainView.findViewById(R.id.layout_dictionary));
        //复制布局
        rLayoutDifficultQuestion = (RelativeLayout) mainView.findViewById(R.id.layout_difficult_question);

        ImvDifficultQuestion = (ImageView) mainView.findViewById(R.id.imageview_collect);
        TvDifficultQuestion = (TextView) mainView.findViewById(R.id.textview_collect);

        //设置每个子布局的事件监听器
        if (paramOnClickListener != null){
            rLayoutDictionary.setOnClickListener(paramOnClickListener);
            rLayoutDifficultQuestion.setOnClickListener(paramOnClickListener);
        }
        setContentView(mainView);
        //设置宽度
        setWidth(paramInt1);
        //设置高度
        setHeight(paramInt2);
        //设置显示隐藏动画
        setAnimationStyle(R.style.AnimTools);
        //设置背景透明
        setBackgroundDrawable(new ColorDrawable(0));
    }
}
